package com.type;

public class TypeDemo3 {
    public static void main(String[] args) {
        //强制类型转换（大到小）
        int a = 30;
        byte b = (byte)a;
        System.out.println(a);
        System.out.println(b);

        //若大类型数量超过了小类型，此时输出小类型只会保留小类型的字节数
        int j = 1500;
        byte i = (byte) j;
        System.out.println(i);//-36

        double score = 99.6;
        int it = (int) score;
        System.out.println(it);//99
    }
}
